package midcode;

public enum OPType {
    GLOBAL_VAL,
    ASSIGN,
    LW_ARRAY,
    SW_ARRAY,
    GETINT,
    PRINT_INT,
    PRINT_STR,

    LABEL_GEN,
    GOTO,
    FUNC_DECL,
    LW_ADDRESS,
    PUSH_PARAM,
    RET_INT,
    RET_VOID,
    EXIT,
    PRE_CALL,
    CALL,
    FIN_CALL,
    GET_RET,

    MULT,
    ADD,
    SUB,
    DIV,
    MOD,
    NOT,

    SLT,
    SLE,
    SGT,
    SGE,
    SEQ,
    SNE,
    BEQ,
    BNE;

    public static boolean isEntryType(OPType opType) {
        return opType == BEQ || opType == BNE || opType == GOTO ||
                opType == RET_INT || opType == RET_VOID || opType == EXIT;
    }
}

